<template>
    <div class="container">
       <el-container >
        <el-header class="header">
            <admin-header ></admin-header>
        </el-header>
         

       </el-container>
       <el-container>
        
            <!-- 侧边栏 -->
           <el-aside class="aside" >

               <left-menu :menu-list="menuList" :active="$route.path"></left-menu>
              

           </el-aside>
           
           <!-- 主体部分 -->
           <el-main class="main">
               <div style="background-color: #fff; height: 85vh;">
                    <!-- 定义插槽 -->
                    <slot name="content"></slot>
               </div>
               

           </el-main>

       </el-container>
        

   </div>
</template>

<script>
import AdminHeader from '../admin-header/AdminHeader.vue';
import LeftMenu from '../left-menu/LeftMenu.vue';
import {post,get} from "@/utils/api";

export default {
    data(){
       return{
          menuList:[]

       }
   },
   methods:{

    getMenuList(){

       const promise =  get({
            url:'/base-system/back/menu/get/list'
        });

        promise.then(res=>{
            // console.log('res',res)
            if(res.code===200){
                this.menuList = res.data;
            }
        })

    }

    

   },
   components:{
       'admin-header':AdminHeader,
       'left-menu':LeftMenu,
   },
   mounted(){
     this.getMenuList();
   }

}
</script>

<style scoped>
/* .content-main{
   background-color: #fff;
   box-shadow: 0 2px 10px rgb(0 0 0 / 12%);
   width: 100%;
  
} */

.container{
    /* background: aliceblue; */
    overflow: auto;
    height:100vh;
    /* display: -webkit-flex;
    -webkit-flex-direction: column;
    justify-content: flex-start; */
    /* width: 100%; */

   /* display: flex; */
   /* flex-direction: column; */
   /* height: 100%; */
   /* min-height: 100vh; */


  
}
.main{
    /* width: 100%;
    height: auto;
    position: relative; */


    
   
   
   /* height: 100%; */
   /* padding-top: 0; */
   background-color: rgb(245, 245, 245);
}

.header{
 
   
   padding: 0;

}

.aside{
   padding: 0;
   width: initial !important;
   height: 100%;
   max-height: 700px;
}



</style>